package org.assistant.common.jdbc.core;

import java.sql.PreparedStatement;
import java.sql.SQLException;

public interface BatchPreparedStatementSetter {
	/**
	 * Set parameter values on the given PreparedStatement.
	 * 
	 * @param ps
	 *            the PreparedStatement to invoke setter methods on
	 * @param i
	 *            index of the statement we're issuing in the batch, starting
	 *            from 0
	 * @throws SQLException
	 *             if a SQLException is encountered (i.e. there is no need to
	 *             catch SQLException)
	 */
	void setValues(PreparedStatement ps, int i) throws SQLException;

	/**
	 * Return the size of the batch.
	 * 
	 * @return the number of statements in the batch
	 */
	int getBatchSize();
}
